package com.bbzn.device.client.service.impl.cwting;

import com.bbzn.device.client.constant.TitleConstant;
import com.bbzn.device.client.service.CwtingStrategy;
import org.springframework.stereotype.Component;

import java.text.MessageFormat;

/**
 * @Author wulongbo
 * @Date 2021/9/1 14:48
 * @Version 1.0
 */

@Component
public class CwtingYgRemoveStrategy extends BaseCwtingService implements CwtingStrategy {


    // 拆卸报警 963
    @Override
    public void dealAlarm(String code, String imei) throws Exception {
        Integer alarmType = 14;
        String cnSign = MessageFormat.format("异常消息：设备号为【{0}】的烟雾感应报警器已被拆卸", imei);
        String enSign = MessageFormat.format("abnormal  message: the smoke sensing alarm with equipment {0} has been removed", imei);
        String title = TitleConstant.REMOVE_ALARM;
        String enTitle = TitleConstant.REMOVE_ALARM_EN;
        String operator = this.common(code, imei, cnSign, enSign, alarmType, title, enTitle);
        this.unionDeviceInGroup(TitleConstant.YG_REMOVE_DEVICE_ACTION,imei, operator);
    }
}
